import type { createObj } from "@/interface/pm/globalTaskType.ts";

/**
 * 项目角色VO
 */
export interface projectRoleVo {
  createTime?: Date;
  creator?: string;
  creatorName?: string;
  /**
   * 创建人
   */
  creatorObject?: createObj;
  i18nColumnMap?: { [key: string]: { [key: string]: any } };
  id?: string;
  /**
   * 是否管理员
   */
  isManager?: string;
  modifier?: string;
  modifierName?: string;
  modifyTime?: Date;
  /**
   * 角色名字
   */
  name?: { [key: string]: string };
  /**
   * 权限JSON，数据权限+功能权限
   */
  permission?: permissionCustom;
  /**
   * 项目ID
   */
  projectId?: string;
  tenantId?: string;
  [property: string]: any;
}

export interface permissionCustom {
  /**
   * 字段权限
   */
  fieldPermission?: permissionField[];
  /**
   * 功能权限
   */
  functionPermission?: permissionField[];
  [property: string]: any;
}

/**
 * 权限值
 */
export interface permissionField {
  /**
   * 权限key
   */
  key?: string;
  /**
   * 权限名
   */
  name?: string;
  /**
   * 权限值
   */
  value?: boolean;
  [property: string]: any;
}

export interface projectRoleCount {
  count: number;
  id: string;
  name: any;
}
